Skip to content

[PW_SID:1127548] x86: Support shstk via prctl#2282

Closed
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1127548
Closed

[PW_SID:1127548] x86: Support shstk via prctl#2282
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1127548

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1127548 applied to workflow__riscv__fixes

Name: x86: Support shstk via prctl
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1127548
Version: 1

Linux RISC-V bot and others added 3 commits July 13, 2026 20:05
Historically, managing the user-space shadow stack state on x86 has
been handled exclusively through the arch_prctl() interface via the
ARCH_SHSTK_* operations. However, other architectures (such as arm64 and
riscv) do not implement arch_prctl() and instead utilize the newer,
arch-agnostic, prctl() interface (i.e. PR_GET_SHADOW_STACK_STATUS and
PR_SET_SHADOW_STACK_STATUS).

To provide language runtimes, toolchains, and libc implementations with a
consistent, cross-architecture interface for managing control-flow
integrity, wire up the generic shadow stack prctl handlers for x86.

Map the generic PR_SHADOW_STACK_ENABLE, PR_SHADOW_STACK_DISABLE, and
PR_SHADOW_STACK_LOCK operations onto the underlying x86 internal CET helper
routines. This allows portable userspace applications to toggle or query
shadow stack states without relying on architecture-specific system calls,
while maintaining backward compatibility with existing arch_prctl() calls.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Run the same test suite for arch_prctl, against prctl, to ensure
consisteny and correctness between the interfaces.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 120.33 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1114.52 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1418.52 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.71 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.64 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.39 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
kdoc
Desc: Detects for kdoc errors
Duration: 0.76 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] x86/shstk: support via prctl"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 119.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1122.60 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1421.02 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.58 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.99 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.22 seconds
Result: WARNING
Output:

CHECK: spaces preferred around that '|' (ctx:VxV)
#78: FILE: tools/testing/selftests/x86/test_shadow_stack.c:143:
+	PRCTL(PR_SET_SHADOW_STACK_STATUS, PR_SHADOW_STACK_ENABLE|PR_SHADOW_STACK_WRITE, 0, 0, 0)
 	                                                        ^

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#167: 
new file mode 100644

total: 0 errors, 1 warnings, 1 checks, 133 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 6d3ce92f083c ("selftests/x86: add generic prctl shadow stack test") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 1 checks, 133 lines checked
CHECK: spaces preferred around that '|' (ctx:VxV)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.43 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.45 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
kdoc
Desc: Detects for kdoc errors
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
module-param
Desc: Detect module_param changes
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 3 times, most recently from 56b6f30 to 8ca72ef Compare July 15, 2026 17:25
@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 60e0882 to 36eafdd Compare July 21, 2026 01:54
@linux-riscv-bot
linux-riscv-bot deleted the pw1127548 branch July 22, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants